package com.xmg.config;

import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author xmg
 * @Description 处理微信错误
 * eading [java.lang.String] as "text/plain" using [org.springframework.http.converter.StringHttpMessageConverter@5552768b]
 * {"errcode":40005,"errmsg":"invalid file type hint: [863Rua03422065]"}
 * @email 463364973@qq.com
 * <p>
 * Date:2019/4/7 15:35
 */
public class WxMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter {
    public WxMappingJackson2HttpMessageConverter(){
        List<MediaType> mediaTypes = new ArrayList<>();
        mediaTypes.add(MediaType.TEXT_PLAIN);
        setSupportedMediaTypes(mediaTypes);
    }
}
